package com.example.bootintegration.listener;

import com.example.bootintegration.entity.Order;
import com.example.bootintegration.entity.Person;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * @author Quintoy
 * @date 2024/7/16
 */
@Service
public class BaseEventListener {

    @EventListener
    public void person(BaseEvent<Person> person) {
        System.out.println(person);
    }

    @EventListener
    public void order(BaseEvent<Order> order) {
        System.out.println(order);
    }
}
